<template>
  <section>
    <div class="question-title">{{xcform_base_xctitle.value}}
      <div class="required" v-if="xcform_prop_required.value==true">(*)</div>
      <i class="el el-icon-view" v-if="xcform_prop_hidden.value===false"></i>
    </div>
    <el-upload class="upload-demo" action="" :on-preview="handlePreview" multiple
      :limit="xcform_base_property_input_upload.limitFileCount"
      :disabled="xcform_prop_readonly.value"
      :list-type="xcform_base_property_input_upload.displayMethod"
      :file-list="control.fileList"
      >
      <el-button size="small" type="primary">点击上传</el-button>
      <div slot="tip" class="el-upload__tip">{{xcform_base_placeholder.value}}</div>
    </el-upload>
  </section>

</template>

<script>
  import file from '@/assets/300x300.png'
  export default {
    props: {
      xcform_base_inputfieldcode: {
        type: Object
      },
      xcform_base_xctitle: {
        type: Object
      },
      xcform_base_property_input_upload: {
        type: Object
      },
      xcform_base_placeholder: {
        type: Object
      },
      xcform_prop_required: {
        type: Object
      },
      xcform_prop_readonly: {
        type: Object
      },
      xcform_prop_hidden: {
        type: Object
      },
      xcform_layout_span: {
        type: Object
      },
    },
    data() {
      return {
        control: {
          fileList: [{
            name: 'file1',
            url: file
          },{
            name: 'file2',
            url: file
          }]
        }
      }
    },
    mounted() {
      let that = this;
    },
    destroyed() {

    },
    methods: {

    }
  }
</script>
<style>
  .el{
    padding-left: 10px;
  }
</style>
